//
//  VideoViewController.m
//  基本框架
//
//  Created by runone02 on 2018/8/22.
//  Copyright © 2018年 liqiyun. All rights reserved.
//

#import "VideoViewController.h"
#import "ZGLVideoPlyer.h"

@interface VideoViewController ()
@property (nonatomic, strong) ZGLVideoPlyer *player;
@end

@implementation VideoViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    [self loadVideoView];
    [self setupNavView];
}

- (void)loadVideoView{
    self.player = [[ZGLVideoPlyer alloc]initWithFrame:CGRectMake(0, kTopBarHeight, SCREEN_WIDTH, 300)];
    self.player.backgroundColor = [UIColor redColor];
    //http://flv2.bn.netease.com/tvmrepo/2017/3/M/1/ECEIM9AM1/SD/ECEIM9AM1-mobile.mp4
    //http://vr.tudou.com/v2proxy/v2.m3u8?it=170010302&st=2
    self.player.videoUrlStr = @"http://flv2.bn.netease.com/tvmrepo/2017/3/M/1/ECEIM9AM1/SD/ECEIM9AM1-mobile.mp4";
    [self.view addSubview:self.player];
}

- (void)setupNavView{
    [self.navView.leftButton setTitle:@"返回" forState:UIControlStateNormal];
    [self.navView.centerButton setTitle:@"视频" forState:UIControlStateNormal];
}
@end
